<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
			<script type="text/javascript">
			
				function addText(){
					let df=document.createDocumentFragment()
					for(var i=0;i<10;i++){
						let text=document.createElement("div")
						text.innerHTML="44"
						df.appendChild(text)
					}
					document.querySelector(".con").appendChild(df)
				}
					function addTmg(){
						let di=document.createDocumentFragment()
						for(var i=0;i<10;i++){
							let text=document.createElement("img")
							text.setAttribute("src","../src/ok.png")
							document.querySelector(".con").appendChild(text)
						}
					
					
				}
				function delete1(){
					let text=document.querySelector(".con>div")
					text.parentNode.removeChild(text)
					
				}
				function delete2(){
					let text=document.querySelector(".con>img")
					text.parentNode.removeChild(text)
					
				}
				function delete3(){
					let text=document.querySelector(".con")
					text.removeChild(text.firstChild)
				}
				function delete4(){
					let text=document.querySelector(".con")
					text.removeChild(text.lastChild)
				}
			</script>
	</head>
	<body>
	
		<body>
			<button onclick="addText()">11</button>
			<button onclick="addTmg()">22</button>
			<button onclick="delete1()">33</button>
			<button onclick="delete2()">44</button>
			<button onclick="delete3()">55</button>
			<button onclick="delete4()">66</button>
			<div class="con"></div>
	</body>
</html>
